UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Wpypd7pX/fW8B0EZUuez6yPYoOLnS3APQ+/9/StS33U='
WHERE
key_id = '6baf81aab4e07f3a96a2207a750c5f239114b1b575a9eb214231c64e9c09b6d3'
AND (
token = 'Wpypd7pX/fW8B0EZUuez6yPYoOLnS3APQ+/9/StS33U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)