UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ef2O8xKTYWA2U+0R2JmF8lWyiu7kjUgGF/KF/PS4Tm8='
WHERE
key_id = 'c228c3665d75d6f725d967255973b0e64772d34d46c9a7423dedac634691b31d'
AND (
token = 'Ef2O8xKTYWA2U+0R2JmF8lWyiu7kjUgGF/KF/PS4Tm8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)