UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/a+2JkP0xxAQ09/GvpLQlOT96P8czD/ygzrp3H3QnqM='
WHERE
key_id = '7719f6c3aee402e8326c4fd9be9999b5ec3542aea5c888f3f61a0fc4f27f237d'
AND (
token = '/a+2JkP0xxAQ09/GvpLQlOT96P8czD/ygzrp3H3QnqM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)