UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+GJi8I1CeIzGqjdIboNL7M4xo+VFq7Qg827m5jUNwF8=' 
WHERE 
  key_id = 'aa69737085546af7a35ce97ed19e53605d6bcc5ad5c0bbfb4e7811ee60fc6f00' 
  AND (
    token = '+GJi8I1CeIzGqjdIboNL7M4xo+VFq7Qg827m5jUNwF8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020