UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oLMtkUpQtMr/8DOYYPeEDEsOJifKZfWywIk0LHHBpfA='
WHERE
key_id = 'dfa3918d677371a8da0c664f677ec30c7e0209f746c406ed8afff6b57cc089c7'
AND (
token = 'oLMtkUpQtMr/8DOYYPeEDEsOJifKZfWywIk0LHHBpfA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)