UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XHRVCh8bMkojUM9g2puEbGY9ut6Z5qY/DVLegngqquM='
WHERE
key_id = '5fc3dcc7e2a03d910c9c0b5e9f1bfca8b02cf2079f46f5de2d09c3ccc9830bb3'
AND (
token = 'XHRVCh8bMkojUM9g2puEbGY9ut6Z5qY/DVLegngqquM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)