UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/K2hHDIN7+DxtFgM5nbqEo8m4l9K0Ib5z2xx+/f5NA4='
WHERE
key_id = '4f884abd4d7ecb2f69ff9e32827804cc178fef198e8bd464997fa78fbb2887ca'
AND (
token = '/K2hHDIN7+DxtFgM5nbqEo8m4l9K0Ib5z2xx+/f5NA4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)