UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nCbX+VYFZrab8MvHv/neukEQnuQ6jt3KBH2FgA2O3uw='
WHERE
key_id = 'ed671259039b94f1c164baac109e0493f7c60907a7983ca400d3a9c545bdc3f1'
AND (
token = 'nCbX+VYFZrab8MvHv/neukEQnuQ6jt3KBH2FgA2O3uw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)