UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Acw7acCAMfet8sU/dJnb0akdu492pT2mL97IL5J8MjM='
WHERE
key_id = 'dcb89ddb6ddcc5481cbe490bcfe1910bc636ae1ce78d93ad6d7f1b8cfa0f8b3d'
AND (
token = 'Acw7acCAMfet8sU/dJnb0akdu492pT2mL97IL5J8MjM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)