UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pXhU6++VWlsEDetYc2uIe46zIXwHDwqkpFfh5FNEXtI='
WHERE
key_id = '7d1b37963909f4ae27a9abcf9006c5f13f7dba04a6cc91de0af1a7d26534fa5d'
AND (
token = 'pXhU6++VWlsEDetYc2uIe46zIXwHDwqkpFfh5FNEXtI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)