UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eHLEk3ksxwySrIneajtKcGlqIqZMZbip0zcy/gWKsEc='
WHERE
key_id = '4783835d27f881a1e8f3a5e932322101ec0dea27f03045f2a66334485c6aa8e5'
AND (
token = 'eHLEk3ksxwySrIneajtKcGlqIqZMZbip0zcy/gWKsEc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)