UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wrwf7OZFl5FjM6IvMsXqepTBK21AxkvaaWuCP8Megyg='
WHERE
key_id = '5b4a72f905aa22ad73b409ea62d37b9962b1ac44c608d18714813276b60b3498'
AND (
token = 'wrwf7OZFl5FjM6IvMsXqepTBK21AxkvaaWuCP8Megyg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)