UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PdDW9IssUUhn/i+/j8u11/3KyPNtbpLvIBujy3hLTFg='
WHERE
key_id = 'a5b6a4ab1c6e1d1f68742a1de7cdd3db008af7d2e0b22d5bf0cace0654f5e3c7'
AND (
token = 'PdDW9IssUUhn/i+/j8u11/3KyPNtbpLvIBujy3hLTFg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)