UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2tuol4KducwtFbJMv1Gx8AAu0PMsCqNxNkuQzjd6lfk='
WHERE
key_id = '2754a7ca344cbbd1480e38e1fb27fe6c6d0227deb822fa80f0dbd23630787511'
AND (
token = '2tuol4KducwtFbJMv1Gx8AAu0PMsCqNxNkuQzjd6lfk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)