UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yM5S6BOxNk4pmvH+/hZ/xwnXy1hHTGs4+5Z0DM6cxLE='
WHERE
key_id = '91f30f030ba36245bc3937432d0d96ecdc295c7916fe83f50a1c9dac0b5b9c1f'
AND (
token = 'yM5S6BOxNk4pmvH+/hZ/xwnXy1hHTGs4+5Z0DM6cxLE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)