UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zF4LinOZPrLDnQL+JQF+SY5K62mqh56TTOzEHUjG7MA='
WHERE
key_id = '57831d46b1792e86cdfdec5bcdc26873cf3262a6880892365ca3ef5f41f3860c'
AND (
token = 'zF4LinOZPrLDnQL+JQF+SY5K62mqh56TTOzEHUjG7MA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)