UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Mk8jvWMGNrRWjNls0WfwTNWTCHBhlhmap8LidApl2Jg='
WHERE
key_id = '06715b1c487d0a32cceb94b67fcfebc944f1693a9e1bf6b11ef79b18aaaf24be'
AND (
token = 'Mk8jvWMGNrRWjNls0WfwTNWTCHBhlhmap8LidApl2Jg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)