UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BlLlDeIRzlVUAjsFplS+Rl4WW1ZMae42ytxAlwfnRpA='
WHERE
key_id = '772cf7154e34a9e9f71dc1fa9ad2ba63dd67610c126b54f9523141a05c37f45e'
AND (
token = 'BlLlDeIRzlVUAjsFplS+Rl4WW1ZMae42ytxAlwfnRpA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)