UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1zrvDIYJksf+2dRMYdm+tp6+HFkfcq6P4Elu6YDaZ7s='
WHERE
key_id = '94f95b28c1afd3629dbec08246b2e27b1085306001d1d6ff0b9ab59407236f0c'
AND (
token = '1zrvDIYJksf+2dRMYdm+tp6+HFkfcq6P4Elu6YDaZ7s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)