UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '10AtH2xmt9VNAU569ZfenyE+NlcYl5EmQBzjOh9iMsM='
WHERE
key_id = 'c45aacb738c477b8ec55b182cb895c0807396a2504574ed5015ae87428dd423b'
AND (
token = '10AtH2xmt9VNAU569ZfenyE+NlcYl5EmQBzjOh9iMsM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)