UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xKGm+Drwphfem6EghXUG+ei7WuEBjSiPtQ446twBzDM='
WHERE
key_id = '7c824922ad21ab06da55eaf175e76200b9d923a2387e36f5b29247fed07027e0'
AND (
token = 'xKGm+Drwphfem6EghXUG+ei7WuEBjSiPtQ446twBzDM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)