UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'pl9qFb69PL4vnFBNIgx+RbB9kdps/bW/oPDXDgYK9k8=' 
WHERE 
  key_id = '3a2f96543fcb73a3161e70a5baa06644d71c60c852c5f730d10ce0283cb2e2b1' 
  AND (
    token = 'pl9qFb69PL4vnFBNIgx+RbB9kdps/bW/oPDXDgYK9k8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025