UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qMR2zkfnFlTaPX7+1R7nyvaGzGlMvzSFg2wfPJOBciI='
WHERE
key_id = '9438b50245aa27462f62de7972e08eb98cf8bbd8a39c11a368676df8aa370bcd'
AND (
token = 'qMR2zkfnFlTaPX7+1R7nyvaGzGlMvzSFg2wfPJOBciI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)