UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1IY9IVUWb6dGGHiHFswcb8vvJdENnu/PvjA/PA2FFZk=' 
WHERE 
  key_id = '2cb0c6676d0d7cb2047cc8a9521ac328b1439b480be9d5ee9b1134406a84f66b' 
  AND (
    token = '1IY9IVUWb6dGGHiHFswcb8vvJdENnu/PvjA/PA2FFZk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039