UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ErikOFdSfovxxfdxMqcsXuxKgWogZoryR2qKPolrehw='
WHERE
key_id = '70b95d6fd9933a5c5c71f58d07eca550339479cec3a3150c217d403508e4a9a1'
AND (
token = 'ErikOFdSfovxxfdxMqcsXuxKgWogZoryR2qKPolrehw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)