UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yqtKs959Ik9wMJ/JTpTPOSUi9huVIlnLcMWCDC+LFqQ='
WHERE
key_id = 'c8ebc74a5db1d5a1a743c9e978323241c892ccb2dd81c0e716cf5c0fdf3fd0ae'
AND (
token = 'yqtKs959Ik9wMJ/JTpTPOSUi9huVIlnLcMWCDC+LFqQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)